<template>
	<view>
		<view class="cart-header ss-flex ss-col-center ss-row-between ss-p-x-30">
			<view class="header-left ss-flex ss-col-center ss-font-26">
				共
				<text class="goods-number ui-TC-Main ss-flex">{{ cartList.length }}</text>
				件商品
			</view>
			<view class="header-right">
				<button v-if="editMode" class="ss-reset-button" @tap="editMode = false">
					取消
				</button>
				<button v-else class="ss-reset-button" style="color:#0277DE ;" @tap="editMode = true">
					编辑
				</button>
			</view>
		</view>

	</view>
</template>
<script>
	import {
		mapMutations,
		mapActions,
		mapState,
		mapGetters
	} from 'vuex';
	let timer = null;
	export default {
		data() {
			return {
				editMode: false
			}
		},
		computed: {
			...mapGetters(['totalCount', 'isSel', 'isActivityPay', 'cartList', 'allSelected']),
			isEmpty() {
				return !this.cartList.length;
			}
		},
		onShow() {
			this.getCartList();
		},
		methods: {

		}
	}
</script>
<style lang="scss" scoped>
	:deep(.ui-fixed) {
		height: 72rpx;
	}

	.cart-box {
		width: 100%;

		.cart-header {
			height: 70rpx;
			background-color: #f6f6f6;
			width: 100%;
			position: fixed;
			left: 0;
			top: v-bind('sys_navBar') rpx;
			z-index: 1000;
			box-sizing: border-box;
		}

		.cart-footer {
			height: 100rpx;
			background-color: #fff;

			.pay-btn {
				width: 180rpx;
				height: 70rpx;
				font-size: 28rpx;
				line-height: 28rpx;
				font-weight: 500;
				border-radius: 40rpx;
			}
		}

		.cart-content {
			margin-top: 70rpx;

			.goods-box {
				background-color: #fff;
			}
		}
	}
</style>